package com.demo.cloud.service;

import com.demo.cloud.service.impl.DemoServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

// name 指定的值是要调用的微服务 application.name 的值
@FeignClient(name = "service-1", fallback = DemoServiceImpl.class)
public interface DemoService {

    /**
     * 调用service-1的hello
     * @param name 参数
     * @return string
     */
    @GetMapping("demo/hello")
    String hello(@RequestParam(value = "name") String name);
}
